<%@ page contentType="text/html;charset=utf-8" %>
<%@ page language="java" import="weibo4j.http.*" %>
<%@ page language="java" import="weibo4j.*" %>

<jsp:useBean id="weboauth" scope="session" class="weibo4j.examples.WebOAuth" />
<%
	AccessToken accessToken = (AccessToken)session.getAttribute("accessToken");
	String ss = request.getParameter("ss");
	
	if(accessToken == null){
		out.println("error");
	}else{
		Weibo weibo = new Weibo();
		weibo.setToken(accessToken);
		Status status = weibo.updateStatus(ss+" 来源：http://www.yuanchongyu.com");
		out.println("共享成功<br/><br/><input type=\"button\" value=\"返回\" onclick=\"javascript:window.location.href='http://www.yuanchongyu.com/sina/call.jsp';\" />");
	}
%>   